using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._LAS
{
    /// <summary>
    /// <para>LAS Dataset To Raster</para>
    /// <para>Creates  a raster using elevation, intensity,  or RGB values stored in the lidar points referenced by the LAS dataset.</para>
    /// <para>使用 LAS 数据集所引用的激光雷达点中存储的高程、强度或 RGB 值创建栅格。</para>
    /// </summary>    
    [DisplayName("LAS Dataset To Raster")]
    public class LasDatasetToRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LasDatasetToRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster</para>
        /// <para><xdoc>
        ///   <para>The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file.</para>
        ///   <para>If the raster is stored as a TIFF file or in a geodatabase, its raster compression type and quality can be specified using geoprocessing environment settings.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格的位置和名称。将栅格数据集存储在地理数据库或 Esri Grid 等文件夹中时，请勿在栅格数据集的名称中添加文件扩展名。在将栅格存储在文件夹中时，可以提供文件扩展名来定义栅格的格式，例如.tif用于生成 GeoTIFF 或 .img 用于生成 ERDAS IMAGINE 格式文件。</para>
        ///   <para>如果栅格存储为 TIFF 文件或地理数据库中，则可以使用地理处理环境设置指定其栅格压缩类型和质量。</para>
        /// </xdoc></para>
        /// </param>
        public LasDatasetToRaster(object _in_las_dataset, object _out_raster)
        {
            this._in_las_dataset = _in_las_dataset;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "LAS Dataset To Raster";

        public override string CallName => "conversion.LasDatasetToRaster";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "compression", "configKeyword", "extent", "geographicTransformations", "outputCoordinateSystem", "pyramid", "rasterStatistics", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _out_raster, _value_field.GetGPValue(), _interpolation_type, _data_type.GetGPValue(), _sampling_type.GetGPValue(), _sampling_value, _z_factor];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Output Raster</para>
        /// <para><xdoc>
        ///   <para>The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file.</para>
        ///   <para>If the raster is stored as a TIFF file or in a geodatabase, its raster compression type and quality can be specified using geoprocessing environment settings.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格的位置和名称。将栅格数据集存储在地理数据库或 Esri Grid 等文件夹中时，请勿在栅格数据集的名称中添加文件扩展名。在将栅格存储在文件夹中时，可以提供文件扩展名来定义栅格的格式，例如.tif用于生成 GeoTIFF 或 .img 用于生成 ERDAS IMAGINE 格式文件。</para>
        ///   <para>如果栅格存储为 TIFF 文件或地理数据库中，则可以使用地理处理环境设置指定其栅格压缩类型和质量。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Value Field</para>
        /// <para><xdoc>
        ///   <para>The lidar data that will be used to generate the raster output.</para>
        ///   <bulletList>
        ///     <bullet_item>Elevation—Elevation from the lidar files will be used to create the raster. This is the default.</bullet_item><para/>
        ///     <bullet_item>Intensity—Intensity information from the lidar files will be used to create the raster.</bullet_item><para/>
        ///     <bullet_item>RGB—RGB values from the lidar points will be used to create 3-band imagery.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于生成栅格输出的激光雷达数据。</para>
        ///   <bulletList>
        ///     <bullet_item>高程 - 激光雷达文件中的高程将用于创建栅格。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>强度—激光雷达文件中的强度信息将用于创建栅格。</bullet_item><para/>
        ///     <bullet_item>RGB—来自激光雷达点的 RGB 值将用于创建 3 波段影像。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _value_field_value _value_field { get; set; } = _value_field_value._ELEVATION;

        public enum _value_field_value
        {
            /// <summary>
            /// <para>Elevation</para>
            /// <para>Elevation—Elevation from the lidar files will be used to create the raster. This is the default.</para>
            /// <para>高程 - 激光雷达文件中的高程将用于创建栅格。这是默认设置。</para>
            /// </summary>
            [Description("Elevation")]
            [GPEnumValue("ELEVATION")]
            _ELEVATION,

            /// <summary>
            /// <para>Intensity</para>
            /// <para>Intensity—Intensity information from the lidar files will be used to create the raster.</para>
            /// <para>强度—激光雷达文件中的强度信息将用于创建栅格。</para>
            /// </summary>
            [Description("Intensity")]
            [GPEnumValue("INTENSITY")]
            _INTENSITY,

            /// <summary>
            /// <para>RGB</para>
            /// <para>RGB—RGB values from the lidar points will be used to create 3-band imagery.</para>
            /// <para>RGB—来自激光雷达点的 RGB 值将用于创建 3 波段影像。</para>
            /// </summary>
            [Description("RGB")]
            [GPEnumValue("RGB")]
            _RGB,

        }

        /// <summary>
        /// <para>Interpolation Type</para>
        /// <para><xdoc>
        ///   <para>The interpolation technique that will be used to determine the cell values of the output raster.</para>
        ///   <para>The binning approach provides a Cell Assignment Method for determining each output cell using the points that fall within its extent, along with a Void Fill Method to determine the value of cells that do not contain any LAS points.</para>
        ///   <para>
        ///     <bold>Cell Assignment Methods</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>AVERAGE—Assigns the average value of all points in the cell. This is the default.</bullet_item><para/>
        ///     <bullet_item>MINIMUM—Assigns the minimum value found in the points within the cell.</bullet_item><para/>
        ///     <bullet_item>MAXIMUM—Assigns the maximum value found in the points within the cell.</bullet_item><para/>
        ///     <bullet_item>IDW—Uses Inverse Distance Weighted interpolation to determine the cell value.</bullet_item><para/>
        ///     <bullet_item>NEAREST—Uses Nearest Neighbor assignment to determine the cell value.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>
        ///     <bold>Void Fill Methods</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>NONE—NoData is assigned to the cell.</bullet_item><para/>
        ///     <bullet_item>SIMPLE—Averages the values from data cells immediately surrounding a NoData cell to eliminate small voids.</bullet_item><para/>
        ///     <bullet_item>LINEAR—Triangulates across void areas and uses linear interpolation on the triangulated value to determine the cell value. This is the default.</bullet_item><para/>
        ///     <bullet_item>NATURAL_NEIGHBOR—Uses natural neighbor interpolation to determine the cell value.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The Triangulation interpolation methods derive cell values using a TIN based approach while also offering the opportunity to speed up processing time by thinning the sampling of LAS data using the Window Size technique.</para>
        ///   <para>
        ///     <bold>Triangulation Methods</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>Linear—Uses linear interpolation to determine cell values.</bullet_item><para/>
        ///     <bullet_item>Natural Neighbors—Uses natural neighbor interpolation to determine cell value.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>
        ///     <bold>Window Size Selection Methods</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>Maximum—The point with the highest value in each window size is maintained. This is the default.</bullet_item><para/>
        ///     <bullet_item>Minimum—The point with the lowest value in each window size is maintained.</bullet_item><para/>
        ///     <bullet_item>Closest To Mean—The point whose value is closest to the average of all point values in the window size is maintained.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于确定输出栅格的像元值的插值技术。</para>
        ///   <para>分箱方法提供了一种像元分配方法，用于使用位于其范围内的点来确定每个输出像元，以及一种空隙填充方法，用于确定不包含任何 LAS 点的像元的值。</para>
        ///   <para>
        ///     <bold>单元格分配方法</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>AVERAGE - 指定单元格中所有点的平均值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>最小值 （MINIMUM） - 指定在单元格内的点中找到的最小值。</bullet_item><para/>
        ///     <bullet_item>MAXIMUM - 指定在单元格内的点中找到的最大值。</bullet_item><para/>
        ///     <bullet_item>IDW - 使用反距离加权插值来确定像元值。</bullet_item><para/>
        ///     <bullet_item>NEAREST - 使用“最近邻”（Nearest Neighbor） 分配来确定像元值。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>
        ///     <bold>Void Fill 方法</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>NONE - 将 NoData 分配给单元。</bullet_item><para/>
        ///     <bullet_item>SIMPLE - 对紧邻 NoData 像元的数据像元的值取平均值，以消除小空隙。</bullet_item><para/>
        ///     <bullet_item>线性 （LINEAR） - 跨空隙区域进行三角测量，并对三角化值使用线性插值来确定像元值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>NATURAL_NEIGHBOR - 使用自然相邻插值来确定像元值。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>三角测量插值方法使用基于 TIN 的方法推导像元值，同时还通过使用窗口大小技术对 LAS 数据进行细化来加快处理时间。</para>
        ///   <para>
        ///     <bold>三角测量方法</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>线性 （Linear） - 使用线性插值确定像元值。</bullet_item><para/>
        ///     <bullet_item>自然邻居 （Natural Neighbors） - 使用自然邻居插值来确定像元值。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>
        ///     <bold>窗口大小选择方法</bold>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>最大值 - 将保留每个窗口大小中具有最高值的点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>最小值 - 保留每个窗口大小中值最低的点。</bullet_item><para/>
        ///     <bullet_item>最接近均值 - 保持其值最接近窗口大小中所有点值的平均值的点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolation Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _interpolation_type { get; set; } = null;


        /// <summary>
        /// <para>Output Data Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of numeric values stored in the output raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Floating Point—The output raster will use 32-bit floating point, which supports values ranging from -3.402823466e+38 to 3.402823466e+38. This is the default.</bullet_item><para/>
        ///     <bullet_item>Integer—The output raster will use an appropriate integer bit depth. This option will round z-values to the nearest whole number and write an integer to each raster cell value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定存储在输出栅格中的数值类型。</para>
        ///   <bulletList>
        ///     <bullet_item>浮点—输出栅格将使用 32 位浮点，该浮点支持范围为 -3.402823466e+38 至 3.402823466e+38 的值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>整数—输出栅格将使用适当的整数位深度。此选项会将 z 值舍入到最接近的整数，并为每个栅格像元值写入一个整数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Data Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_type_value _data_type { get; set; } = _data_type_value._FLOAT;

        public enum _data_type_value
        {
            /// <summary>
            /// <para>Floating Point</para>
            /// <para>Floating Point—The output raster will use 32-bit floating point, which supports values ranging from -3.402823466e+38 to 3.402823466e+38. This is the default.</para>
            /// <para>浮点—输出栅格将使用 32 位浮点，该浮点支持范围为 -3.402823466e+38 至 3.402823466e+38 的值。这是默认设置。</para>
            /// </summary>
            [Description("Floating Point")]
            [GPEnumValue("FLOAT")]
            _FLOAT,

            /// <summary>
            /// <para>Integer</para>
            /// <para>Integer—The output raster will use an appropriate integer bit depth. This option will round z-values to the nearest whole number and write an integer to each raster cell value.</para>
            /// <para>整数—输出栅格将使用适当的整数位深度。此选项会将 z 值舍入到最接近的整数，并为每个栅格像元值写入一个整数。</para>
            /// </summary>
            [Description("Integer")]
            [GPEnumValue("INT")]
            _INT,

        }

        /// <summary>
        /// <para>Sampling Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the method that will be used for interpreting the Sampling Value parameter value to define the resolution of the output raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Observations—The number of cells that divide the lengthiest side of the LAS dataset extent will be used.</bullet_item><para/>
        ///     <bullet_item>Cell Size—The cell size of the output raster will be used. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于解释采样值参数值以定义输出栅格分辨率的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>观测点—将使用划分 LAS 数据集最长边的像元数。</bullet_item><para/>
        ///     <bullet_item>像元大小—将使用输出栅格的像元大小。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _sampling_type_value _sampling_type { get; set; } = _sampling_type_value._CELLSIZE;

        public enum _sampling_type_value
        {
            /// <summary>
            /// <para>Observations</para>
            /// <para>Observations—The number of cells that divide the lengthiest side of the LAS dataset extent will be used.</para>
            /// <para>观测点—将使用划分 LAS 数据集最长边的像元数。</para>
            /// </summary>
            [Description("Observations")]
            [GPEnumValue("OBSERVATIONS")]
            _OBSERVATIONS,

            /// <summary>
            /// <para>Cell Size</para>
            /// <para>Cell Size—The cell size of the output raster will be used. This is the default.</para>
            /// <para>像元大小—将使用输出栅格的像元大小。这是默认设置。</para>
            /// </summary>
            [Description("Cell Size")]
            [GPEnumValue("CELLSIZE")]
            _CELLSIZE,

        }

        /// <summary>
        /// <para>Sampling Value</para>
        /// <para>The value used in conjunction with the Sampling Type parameter to define the resolution of the output raster.</para>
        /// <para>与采样类型参数结合使用的值，用于定义输出栅格的分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _sampling_value { get; set; } = 10;


        /// <summary>
        /// <para>Z Factor</para>
        /// <para>The factor by which z-values will be multiplied. This is typically used to convert z linear units to match x,y linear units. The default is 1, which leaves elevation values unchanged. This parameter is not available if the spatial reference of the input surface has a z datum with a specified linear unit.</para>
        /// <para>z 值将乘以的因子。这通常用于转换 z 线性单位以匹配 x，y 线性单位。默认值为 1，使高程值保持不变。如果输入曲面的空间参考具有具有指定线性单位的 z 基准面，则此参数不可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        public LasDatasetToRaster SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object pyramid = null, object rasterStatistics = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, pyramid: pyramid, rasterStatistics: rasterStatistics, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}